﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UserData;
namespace StationDemo
{
    [Serializable]
    public class ResultData : ResultDataBase
    {

        public TestInfo RMS_Mean { get; set; } = new TestInfo { Name = "平均重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo RMS_Max { get; set; } = new TestInfo { Name = "最大重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Coverage { get; set; } = new TestInfo { Name = "覆盖率", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};

        public TestInfo Cx { get; set; } = new TestInfo { Name = "Cx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cy { get; set; } = new TestInfo { Name = "Cy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fx { get; set; } = new TestInfo { Name = "fx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fy { get; set; } = new TestInfo { Name = "fy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};


        public TestInfo K0 { get; set; } = new TestInfo { Name = "K0", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K1 { get; set; } = new TestInfo { Name = "K1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K2 { get; set; } = new TestInfo { Name = "K2", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        //   public TestInfo K3 { get; set; } = new TestInfo { Name = "K3", Value = double.NaN, Max = " ", Min = " ", PointCount = 4 ,IsUse = false};
        public TestInfo P0 { get; set; } = new TestInfo { Name = "P0", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo P1 { get; set; } = new TestInfo { Name = "P1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};


    }

    [Serializable]
    public class ResultData1 : ResultDataBase
    {

        public TestInfo RMS_Mean { get; set; } = new TestInfo { Name = "平均重投影", Value = 0.0, Max = " ", Min = " ", PointCount = 4};
        public TestInfo RMS_Max { get; set; } = new TestInfo { Name = "最大重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Coverage { get; set; } = new TestInfo { Name = "覆盖率", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cx { get; set; } = new TestInfo { Name = "Cx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cy { get; set; } = new TestInfo { Name = "Cy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fx { get; set; } = new TestInfo { Name = "fx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fy { get; set; } = new TestInfo { Name = "fy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};


        public TestInfo K0 { get; set; } = new TestInfo { Name = "K0", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K1 { get; set; } = new TestInfo { Name = "K1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K2 { get; set; } = new TestInfo { Name = "K2", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K3 { get; set; } = new TestInfo { Name = "K3", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K4 { get; set; } = new TestInfo { Name = "K4", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K5 { get; set; } = new TestInfo { Name = "K5", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo P0 { get; set; } = new TestInfo { Name = "P0", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo P1 { get; set; } = new TestInfo { Name = "P1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};


    }
    [Serializable]
    public class ResultData2 : ResultDataBase
    {

        public TestInfo RMS_Mean { get; set; } = new TestInfo { Name = "平均重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo RMS_Max { get; set; } = new TestInfo { Name = "最大重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Coverage { get; set; } = new TestInfo { Name = "覆盖率", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cx { get; set; } = new TestInfo { Name = "Cx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cy { get; set; } = new TestInfo { Name = "Cy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fx { get; set; } = new TestInfo { Name = "fx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fy { get; set; } = new TestInfo { Name = "fy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};


        public TestInfo K0 { get; set; } = new TestInfo { Name = "K0", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K1 { get; set; } = new TestInfo { Name = "K1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K2 { get; set; } = new TestInfo { Name = "K2", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K3 { get; set; } = new TestInfo { Name = "K3", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};

    }
    [Serializable]
    public class ResultData3 : ResultDataBase
    {

        public TestInfo RMS_Mean { get; set; } = new TestInfo { Name = "平均重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo RMS_Max { get; set; } = new TestInfo { Name = "最大重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Coverage { get; set; } = new TestInfo { Name = "覆盖率", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cx { get; set; } = new TestInfo { Name = "Cx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cy { get; set; } = new TestInfo { Name = "Cy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fx { get; set; } = new TestInfo { Name = "fx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo fy { get; set; } = new TestInfo { Name = "fy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};


        public TestInfo K0 { get; set; } = new TestInfo { Name = "K0", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo K1 { get; set; } = new TestInfo { Name = "K1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};


        public TestInfo P0 { get; set; } = new TestInfo { Name = "P0", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo P1 { get; set; } = new TestInfo { Name = "P1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo MeiXi { get; set; } = new TestInfo { Name = "MeiXi", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};

    }

    [Serializable]
    public class ResultData5 : ResultDataBase
    {

        public TestInfo RMS_Mean { get; set; } = new TestInfo { Name = "平均重投影", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo RMS_Max { get; set; } = new TestInfo { Name = "最大重投影", Value = double.NaN, Max = " ", Min = " ", PointCount =4  };
        public TestInfo Coverage { get; set; } = new TestInfo { Name = "覆盖率", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cx { get; set; } = new TestInfo { Name = "Cx", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Cy { get; set; } = new TestInfo { Name = "Cy", Value = double.NaN, Max = " ", Min = " ", PointCount = 4 };
        public TestInfo PolyCoeffs1 { get; set; } = new TestInfo { Name = "PolyCoeffs1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo PolyCoeffs2 { get; set; } = new TestInfo { Name = "PolyCoeffs2", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo PolyCoeffs3 { get; set; } = new TestInfo { Name = "PolyCoeffs3", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo PolyCoeffs4 { get; set; } = new TestInfo { Name = "PolyCoeffs4", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo PolyCoeffs5 { get; set; } = new TestInfo { Name = "PolyCoeffs5", Value = double.NaN, Max = " ", Min = " ", PointCount = 4 };

        public TestInfo InvPoly1 { get; set; } = new TestInfo { Name = "InvPoly1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly2 { get; set; } = new TestInfo { Name = "InvPoly2", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly3 { get; set; } = new TestInfo { Name = "InvPoly3", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly4 { get; set; } = new TestInfo { Name = "InvPoly4", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly5 { get; set; } = new TestInfo { Name = "InvPoly5", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly6 { get; set; } = new TestInfo { Name = "InvPoly6", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly7 { get; set; } = new TestInfo { Name = "InvPoly7", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly8 { get; set; } = new TestInfo { Name = "InvPoly8", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly9 { get; set; } = new TestInfo { Name = "InvPoly9", Value = double.NaN, Max = " ", Min = " ", PointCount = 4 };
        public TestInfo InvPoly10 { get; set; } = new TestInfo { Name = "InvPoly10", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly11 { get; set; } = new TestInfo { Name = "InvPoly11", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly12 { get; set; } = new TestInfo { Name = "InvPoly12", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly13 { get; set; } = new TestInfo { Name = "InvPoly13", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly14 { get; set; } = new TestInfo { Name = "InvPoly14", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly15 { get; set; } = new TestInfo { Name = "InvPoly15", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly16 { get; set; } = new TestInfo { Name = "InvPoly16", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly17 { get; set; } = new TestInfo { Name = "InvPoly17", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly18 { get; set; } = new TestInfo { Name = "InvPoly18", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly19 { get; set; } = new TestInfo { Name = "InvPoly19", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo InvPoly20 { get; set; } = new TestInfo { Name = "InvPoly20", Value = double.NaN, Max = " ", Min = " ", PointCount = 4 };
        public TestInfo AffineParas1 { get; set; } = new TestInfo { Name = "AffineParas1", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo AffineParas2 { get; set; } = new TestInfo { Name = "AffineParas2", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo AffineParas3 { get; set; } = new TestInfo { Name = "AffineParas3", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo AffineParas4 { get; set; } = new TestInfo { Name = "AffineParas4", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo AffineParas5 { get; set; } = new TestInfo { Name = "AffineParas5", Value = double.NaN, Max = " ", Min = " ", PointCount = 4 };


    }


    [Serializable]
    public class ResultDataBase:TestResultbase
    {
        public TestInfo str_机型 { get; set; } = new TestInfo { Name = "机型", Value = "", Max = " ", Min = " ", PointCount = 4 };
        public TestInfo str_批次 { get; set; } = new TestInfo { Name = "批次", Value = "", Max = " ", Min = " ", PointCount = 4 };
        public TestInfo str_操作者 { get; set; } = new TestInfo { Name = "设备操作者", Value = "", Max = " ", Min = " ", PointCount = 4 };
        public TestInfo str_设备编号 { get; set; } = new TestInfo { Name = "设备编号", Value = "", Max = " ", Min = " ", PointCount = 4 };
        public TestInfo str_工站编号 { get; set; } = new TestInfo { Name = "工站编号", Value = "", Max = " ", Min = " ", PointCount = 4 };
        public TestInfo str_外壳SN { get; set; } = new TestInfo { Name = "外壳SN", Value = "", Max = " ", Min = " ", PointCount = 4 };
        public TestInfo FailStep { get; set; } = new TestInfo { Name = "NG原因", Value = "", Max = " ", Min = " ", PointCount = 4 };
        public TestInfo TestTime { get; set; } = new TestInfo { Name = "测试时间", Value = 0.00, Max = " ", Min = " ", PointCount = 4 };
        public TestInfo Result { get; set; } = new TestInfo { Name = "测试结果", Value = true, Max = " ", Min = " ", PointCount = 4 };
        public TestInfo Current { get; set; } = new TestInfo { Name = "电流", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Voltage { get; set; } = new TestInfo { Name = "电压", Value = double.NaN, Max = " ", Min = " ", PointCount = 4};
        public TestInfo Center_x { get; set; } = new TestInfo { Name = "对心偏差X", Value = double.NaN, Max = " ", Min = " " };
        public TestInfo Center_y { get; set; } = new TestInfo { Name = "对心偏差Y", Value = double.NaN, Max = " ", Min = " " };


    }


}